package org.ISCS.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName project
 */
@TableName(value ="project")
@Data
public class Project implements Serializable {
    /**
     * 项目id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 项目名称
     */
    private String projectName;

    /**
     * 项目服务数
     */
    private Integer projectServicesNum;

    /**
     * 项目url
     */
    private String projectUrl;

    /**
     * 项目创建人
     */
    private String projectCreateUser;

    /**
     * 项目创建时间
     */
    private Date projectCreateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Project(String projectName, int projectServicesNum, String projectUrl, String createUser, Date projectCreateTime) {
        this.projectName = projectName;
        this.projectServicesNum = projectServicesNum;
        this.projectUrl = projectUrl;
        this.projectCreateUser = createUser;
        this.projectCreateTime = projectCreateTime;
    }
    public Project(Long id, String projectName, int projectServicesNum, String projectUrl, String createUser, Date projectCreateTime) {
        this.id = id;
        this.projectName = projectName;
        this.projectServicesNum = projectServicesNum;
        this.projectUrl = projectUrl;
        this.projectCreateUser = createUser;
        this.projectCreateTime = projectCreateTime;
    }
    public Project(){

    }
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Project other = (Project) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProjectName() == null ? other.getProjectName() == null : this.getProjectName().equals(other.getProjectName()))
            && (this.getProjectServicesNum() == null ? other.getProjectServicesNum() == null : this.getProjectServicesNum().equals(other.getProjectServicesNum()))
            && (this.getProjectUrl() == null ? other.getProjectUrl() == null : this.getProjectUrl().equals(other.getProjectUrl()))
            && (this.getProjectCreateUser() == null ? other.getProjectCreateUser() == null : this.getProjectCreateUser().equals(other.getProjectCreateUser()))
            && (this.getProjectCreateTime() == null ? other.getProjectCreateTime() == null : this.getProjectCreateTime().equals(other.getProjectCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProjectName() == null) ? 0 : getProjectName().hashCode());
        result = prime * result + ((getProjectServicesNum() == null) ? 0 : getProjectServicesNum().hashCode());
        result = prime * result + ((getProjectUrl() == null) ? 0 : getProjectUrl().hashCode());
        result = prime * result + ((getProjectCreateUser() == null) ? 0 : getProjectCreateUser().hashCode());
        result = prime * result + ((getProjectCreateTime() == null) ? 0 : getProjectCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", projectName=").append(projectName);
        sb.append(", projectServicesNum=").append(projectServicesNum);
        sb.append(", projectUrl=").append(projectUrl);
        sb.append(", projectCreateUser=").append(projectCreateUser);
        sb.append(", projectCreateTime=").append(projectCreateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}